Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(APIM-531): fix swagger regex field #313

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

AlexBramhill
Copy link
Contributor

@AlexBramhill AlexBramhill commented Jul 12, 2023

Introduction

nestjs/swagger decorator apiProperty takes a string for pattern, and not a Regexp. As a result, we turn our existing regexp into strings to be used in swagger.

In the old implementation of this, regex expressions were getting split prematurely if there was an additional / in the expression.

Solution

I've created a helper function to avoid this occurring, as apposed to relying on split

@AlexBramhill AlexBramhill temporarily deployed to qa July 12, 2023 09:52 — with GitHub Actions Inactive
@AlexBramhill AlexBramhill temporarily deployed to qa July 12, 2023 09:52 — with GitHub Actions Inactive
@AlexBramhill AlexBramhill temporarily deployed to qa July 12, 2023 09:52 — with GitHub Actions Inactive
Copy link
Contributor

@lmarrai-sw lmarrai-sw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks @AlexBramhill
(there's a linter issue which we're already aware of and will be fixed in a separate PR)

@AlexBramhill AlexBramhill merged commit 6e94688 into main Jul 12, 2023
10 of 11 checks passed
@AlexBramhill AlexBramhill deleted the fix/apim-531/fix-swagger-regex branch July 12, 2023 10:20
abhi-markan pushed a commit that referenced this pull request Jul 21, 2023
🤖 I have created a release *beep* *boop*
---


##
[1.15.0](v1.14.0...v1.15.0)
(2023-07-21)


### Features

* **APIM-471:** added constants for examples, + cleanup
([d27b131](d27b131))
* **APIM-471:** added LOG_LEVEL env var to deployment and github files
([6eaba2e](6eaba2e))
* **APIM-471:** added new environment variables to docker files
([3ef1328](3ef1328))
* **APIM-471:** cleanup, rename query var and other PR comments
([1d1787e](1d1787e))
* **APIM-471:** endpoint GET /customers - get information from
Salesforce through Informatica REST API
([#280](#280))
([df5150f](df5150f))
* **APIM-471:** fixed informatica query
([82f620f](82f620f))
* **APIM-471:** tests and changes for endpoint GET /customers
([7b82183](7b82183))


### Bug Fixes

* **APIM-531:** fix swagger regex field
([#300](#300))
([b6d09b7](b6d09b7))
* **APIM-531:** fix swagger regex field
([#313](#313))
([6e94688](6e94688))
* **deps:** update dependency @nestjs/swagger to v7.1.2
([#331](#331))
([db807a6](db807a6))
* **env:** environment variable update
([#299](#299))
([3dff5b0](3dff5b0))


### Miscellaneous

* **deps-dev:** Bump @commitlint/cli from 17.6.6 to 17.6.7
([#333](#333))
([0e038b8](0e038b8))
* **deps-dev:** Bump @commitlint/config-conventional from 17.6.6 to
17.6.7 ([#334](#334))
([91ef159](91ef159))
* **deps-dev:** Bump @nestjs/cli from 10.1.1 to 10.1.3
([#287](#287))
([fb54e6c](fb54e6c))
* **deps-dev:** Bump @nestjs/cli from 10.1.8 to 10.1.9
([26c30cd](26c30cd))
* **deps-dev:** Bump @nestjs/cli from 10.1.8 to 10.1.9
([#320](#320))
([ed3ea84](ed3ea84))
* **deps-dev:** Bump @nestjs/cli from 10.1.9 to 10.1.10
([#335](#335))
([1956af3](1956af3))
* **deps-dev:** Bump @tsconfig/node20 from 1.0.2 to 20.1.0
([333b439](333b439))
* **deps-dev:** Bump @tsconfig/node20 from 1.0.2 to 20.1.0
([#319](#319))
([7df6d01](7df6d01))
* **deps-dev:** Bump @types/jest from 29.5.2 to 29.5.3
([#304](#304))
([25fd473](25fd473))
* **deps-dev:** Bump @types/node from 20.4.0 to 20.4.1
([#298](#298))
([f1c90c1](f1c90c1))
* **deps-dev:** Bump @types/node from 20.4.1 to 20.4.2
([#314](#314))
([826d696](826d696))
* **deps-dev:** Bump @typescript-eslint/eslint-plugin
([aec87b6](aec87b6))
* **deps-dev:** Bump @typescript-eslint/eslint-plugin from 5.60.1 to
5.61.0 ([#285](#285))
([003f662](003f662))
* **deps-dev:** Bump @typescript-eslint/eslint-plugin from 5.61.0 to
6.0.0 ([#305](#305))
([28c8eb2](28c8eb2))
* **deps-dev:** Bump @typescript-eslint/eslint-plugin from 6.0.0 to
6.1.0 ([#325](#325))
([7c4d6d9](7c4d6d9))
* **deps-dev:** Bump @typescript-eslint/parser from 5.60.1 to 5.61.0
([#283](#283))
([ef690f8](ef690f8))
* **deps-dev:** Bump @typescript-eslint/parser from 5.62.0 to 6.0.0
([2dcab0d](2dcab0d))
* **deps-dev:** Bump @typescript-eslint/parser from 5.62.0 to 6.0.0
([#321](#321))
([ff84253](ff84253))
* **deps-dev:** Bump @typescript-eslint/parser from 6.0.0 to 6.1.0
([25743dc](25743dc))
* **deps-dev:** Bump @typescript-eslint/parser from 6.0.0 to 6.1.0
([#326](#326))
([1ea233a](1ea233a))
* **deps-dev:** Bump cspell from 6.31.1 to 6.31.2
([1904167](1904167))
* **deps-dev:** Bump cspell from 6.31.1 to 6.31.2
([#323](#323))
([67abd58](67abd58))
* **deps-dev:** Bump eslint from 8.44.0 to 8.45.0
([65919e0](65919e0))
* **deps-dev:** Bump eslint from 8.44.0 to 8.45.0
([#322](#322))
([a44aa79](a44aa79))
* **deps-dev:** Bump eslint-config-airbnb-typescript from 17.0.0 to
17.1.0 ([#317](#317))
([4f2db84](4f2db84))
* **deps-dev:** Bump eslint-plugin-jest from 27.2.2 to 27.2.3
([#315](#315))
([a0a6b21](a0a6b21))
* **deps-dev:** Bump eslint-plugin-prettier from 4.2.1 to 5.0.0
([#311](#311))
([db652fd](db652fd))
* **deps-dev:** Bump eslint-plugin-unused-imports from 2.0.0 to 3.0.0
([#310](#310))
([f828298](f828298))
* **deps-dev:** Bump jest from 29.6.0 to 29.6.1
([f00d7a7](f00d7a7))
* **deps-dev:** Bump jest from 29.6.0 to 29.6.1
([#296](#296))
([573a43c](573a43c))
* **deps-dev:** Bump nock from 13.3.1 to 13.3.2
([#316](#316))
([eff446c](eff446c))
* **deps-dev:** Bump prettier from 2.8.8 to 3.0.0
([#294](#294))
([b348897](b348897))
* **deps-dev:** Bump prettier from 2.8.8 to 3.0.0
([#307](#307))
([4b29e63](4b29e63))
* **deps-dev:** Bump sort-package-json from 2.5.0 to 2.5.1
([#297](#297))
([488df4d](488df4d))
* **deps:** Bump @nestjs/common from 10.0.5 to 10.1.0
([942060c](942060c))
* **deps:** Bump @nestjs/common from 10.0.5 to 10.1.0
([#327](#327))
([9b3d196](9b3d196))
* **deps:** Bump @nestjs/core from 10.0.5 to 10.1.0
([1e1a872](1e1a872))
* **deps:** Bump @nestjs/core from 10.0.5 to 10.1.0
([#329](#329))
([3433ce0](3433ce0))
* **deps:** Bump @nestjs/platform-express from 10.0.5 to 10.1.0
([3581a17](3581a17))
* **deps:** Bump @nestjs/platform-express from 10.0.5 to 10.1.0
([#328](#328))
([b2988a4](b2988a4))
* **deps:** Bump @nestjs/swagger from 7.1.1 to 7.1.2
([#336](#336))
([6c7cd60](6c7cd60))
* **deps:** docker node update
([#330](#330))
([cee9623](cee9623))
* **deps:** update dependency @nestjs/cli to v10.1.3
([#284](#284))
([0782f8a](0782f8a))
* **deps:** update dependency @nestjs/cli to v10.1.7
([#291](#291))
([d71fe4e](d71fe4e))
* **deps:** update dependency @nestjs/cli to v10.1.8
([#308](#308))
([2bf093a](2bf093a))
* **deps:** update dependency @types/jest to v29.5.3
([#301](#301))
([b1910cb](b1910cb))
* **deps:** update dependency @types/node to v20.4.0
([#293](#293))
([a36fa82](a36fa82))
* **deps:** update dependency @typescript-eslint/parser to v5.61.0
([#281](#281))
([f2ab74a](f2ab74a))
* **deps:** update dependency jest to v29.6.0
([#289](#289))
([966d0ff](966d0ff))
* **deps:** update dependency jest to v29.6.1
([#295](#295))
([80a589f](80a589f))
* **deps:** update typescript-eslint monorepo to v5.62.0
([#302](#302))
([9cd28a9](9cd28a9))
* **dockerfile:** version updates
([#332](#332))
([d4da75b](d4da75b))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants